import React,{Component} from "react";
import "babel-polyfill"
import {LocaleProvider} from "antd";
import {BrowserRouter as Router,Switch, Route } from 'react-router-dom';

import Index from "./pages/index.js";
import ArticleDetail from "./pages/articleDetail.js";

import Announcement from "./pages/announcement.js";
import Airport from "./pages/airport.js";
import Airplain from "./pages/airplain.js";
import Passenger from "./pages/passenger.js";
import Comments from "./pages/comments.js";
import Search from "./pages/search.js";
import Login from "./pages/login.js";
import Register from "./pages/register.js";
import Registersecond from './pages/registerSecond.js';
import Registerthird from './pages/registerThird.js'
import PassWord from "./pages/password.js";
import PassWordS from "./pages/passwordS.js";
import PassWordT from "./pages/passwordT.js";
import BookF from './pages/bookF.js';
import BookS from './pages/bookS.js';
import BookT from './pages/bookT.js';
import BookFourth from './pages/bookFourth.js';
import Unsubscribe from './pages/unsubscribe.js';
import Personal from "./pages/personal.js";
import Management from "./pages/management.js";

import 'antd/dist/antd.css';
import './assets/stylesheets/style.css';
import zhCN from 'antd/lib/locale-provider/zh_CN';

class App extends Component{
    constructor(props){
        super(props);
    }
    componentWillUnmount(){
        // localStorage.clear();
    }
    render(){
        return(<LocaleProvider locale={zhCN} >
            <Router>
                <Switch>
                    <Route path="/registerSecond" component={Registersecond}></Route>
                    <Route path="/registerThird" component={Registerthird}></Route>
                    <Route path="/register" component={Register}></Route>
                    <Route path="/login" component={Login}></Route>
                    <Route path="/book" component={BookF}></Route>
                    <Route path="/bookSecond" component={BookS}></Route>
                    <Route path="/bookThird" component={BookT}></Route>
                    <Route path="/bookFourth" component={BookFourth}></Route>
                    <Route path="/unsubscribe" component={Unsubscribe}></Route>
                    <Route path="/search" component={Search}></Route>
                    <Route path="/password" component={PassWord}></Route>
                    <Route path="/passwordSecond" component={PassWordS}></Route>
                    <Route path="/passwordThird" component={PassWordT}></Route>
                    <Route path="/management" component={Management}></Route>
                    <Route path="/personal" component={Personal}></Route>
                    <Route path="/announcement" component={Announcement}></Route>
                    <Route path="/airport" component={Airport}></Route>
                    <Route path="/airplain" component={Airplain}></Route>
                    <Route path="/passenger" component={Passenger}></Route>
                    <Route path="/comments" component={Comments}></Route>
                    <Route path="/articleDetail" component={ArticleDetail}></Route>
                    <Route exact path="/" component={Index}></Route>
                </Switch>
            </Router>
        </LocaleProvider>)
    }
}
export default App;